package congcong;

import java.util.Scanner;

public class Sub {
	public static void main(String[] args) {
		String str = everyNth("Miracle", 2);
		System.out.println(str);
	}

	public static String everyNth(String str, int n) {
		String result = "";

		// Look at every nth char
		for (int i = 0; i < str.length(); i = i + n) {
			result = result + str.charAt(i);
		}
		return result;
	}
}
